﻿using PmSoft.Entity;
using System.ComponentModel.DataAnnotations;

namespace ManagementApi.Models.Auth
{
    /// <summary>
    /// 用户登录表单模型
    /// </summary>
    public class UserLoginForm
    {
        /// <summary>
        /// 登录用户类型
        /// </summary>
        [Display(Name = "登录用户类型")]
        [Required(ErrorMessage = "{0}不能为空")]
        public UserType? UserType { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        [Display(Name = "用户名")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string UserName { get; set; } = string.Empty;

        /// <summary>
        /// 密码
        /// </summary>
        [Display(Name = "密码")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Password { get; set; } = string.Empty;

        /// <summary>
        /// 验证码
        /// </summary>
        [Display(Name = "验证码")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Code { get; set; } = string.Empty;
        /// <summary>
        /// 唯一码
        /// </summary>
        [Display(Name = "唯一码")]
        public string? Id { get; set; }
    }
}
